package org.charless.skeleton.bo;

import java.security.Key;
import java.util.ArrayList;
import java.util.List;

import javax.crypto.KeyGenerator;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name="USERS")
@NamedQueries({
	@NamedQuery(name="User.byName", query="from User u where u.name = :name")
})
public class User {
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name="USER_ID")
    private Integer id;

    @Column(name="USER_NAME", nullable=false, unique=true)
    private String name;
    
    /*********************************************
	  * Constructors                             *
	 **********************************************/
    public User() {
    	
    }
    
	/*********************************************
	  * Getters and Setters ...                  *
	 **********************************************/
	public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
   
}
